var express = require('express');
var router = express.Router();
const {API_PREFIX}=require('../config/api')
const  controlUser=require('../Controller/user/user')

const {authenticateToken}=require('../Middlewear/authenticateToken')
router.put(API_PREFIX+'/user/update/:id',authenticateToken, controlUser.update)
router.delete(API_PREFIX+'/user/del/:id',authenticateToken, controlUser.del)
router.post(API_PREFIX+'/user/add',authenticateToken, controlUser.add)
router.get(API_PREFIX+'/user/queryUserList',authenticateToken, controlUser.queryUserList)
module.exports = router;

/**
 * @swagger
 * /user/update/:id:
 *   put:
 *     summary: 编辑用户
 *     description: 编辑用户
 *     tags:
 *       - 用户
 *     parameters:
 *       - in: FormData
 *         name: file
 *         schema:
 *           type: file
 *         required: true
 *         description: The ID of the user to retrieve.
 *     responses:
 *       200:
 *         description: A list of users.
 */

/**
 * @swagger
 * /user/del/:id:
 *   delete:
 *     summary: 删除用户
 *     description: 删除用户
 *     tags:
 *       - 用户
 *     parameters:
 *       - in: FormData
 *         name: file
 *         schema:
 *           type: file
 *         required: true
 *         description: The ID of the user to retrieve.
 *     responses:
 *       200:
 *         description: A list of users.
 */
/**
 * @swagger
 * /user/add:
 *   post:
 *     summary: 新增用户
 *     description: 新增用户
 *     tags:
 *       - 用户
 *     parameters:
 *       - in: FormData
 *         name: file
 *         schema:
 *           type: file
 *         required: true
 *         description: The ID of the user to retrieve.
 *     responses:
 *       200:
 *         description: A list of users.
 */
/**
 * @swagger
 * /queryUserList:
 *   get:
 *     summary: 用户列表
 *     description: 用户列表
 *     tags:
 *       - 用户
 *     parameters:
 *       - in: FormData
 *         name: file
 *         schema:
 *           type: file
 *         required: true
 *         description: The ID of the user to retrieve.
 *     responses:
 *       200:
 *         description: A list of users.
 */